import request from "../../utils/request";
// https://m.ximalaya.com/m-revision/page/category/queryCategoriesV2

import {AnyObject} from './type'

export default{
  //获取数据
  reqCateList(){
    return request.get<any,AnyObject>('/m-revision/page/category/queryCategoriesV2')
  },
  //获取一级分类
  reqCateList1(categoryId:number){
    return request.get<any,AnyObject>(`revision/category/v2/metadata/info?categoryId=${categoryId}`)
  },
  //获取二级分类
  reqCateList2(params:AnyObject){
    return request.get<any,AnyObject>(`/revision/category/v2/albums?pageNum=${params.pageNum}&pageSize=${params.pageSize}&sort=${params.sort}&categoryId=${params.categoryId}&metadataValues=${params.metadataValues}`)
  }
}

// https://m.ximalaya.com/revision/category/v2/metadata/info?categoryId={categoryId}